import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

//查询用工分配
export function getStaffAssignmentsList(query) {
  return request({
    url: '/operation/need/getStaffAssignmentsList',
    method: 'get',
    params: query
  })
}

// 删除用工分配
export function deleteStaffAssignments(staffAssignmentsId) {
  return request({
    url: '/operation/need/deleteStaffAssignments/' + staffAssignmentsId,
    method: 'delete'
  })
}

// 用工分配审核
export function auditStaffAssignments(data) {
  return request({
    url: '/operation/need/auditStaffAssignments',
    method: 'post',
    data: data
  })
}

/**
 * 用工分配详情
 * @param operationNeedId
 */
export function viewStaffAssignments(staffAssignmentsId) {
  return request({
    url: '/operation/need/viewStaffAssignments/' + staffAssignmentsId,
    method: 'get'
  })
}

/**
 * 用工分配需求
 * @param data
 */
export function updateStaffAssignments(data) {
  return request({
    url: '/operation/need/updateStaffAssignments',
    method: 'post',
    data: data
  })
}

